package test;

import java.util.concurrent.TimeUnit;

/**
 * Created by lzy
 * Date: 2018/6/13
 */
public class ThreadB implements Runnable {
    private int count = 5;
    @Override
    public void run() {
        while (count>0) {
            try {
                TimeUnit.SECONDS.sleep(1);
            } catch (InterruptedException e) {
                e.printStackTrace();
            } finally {
                count--;
                System.out.println("count:" + count);
            }
        }
        System.out.println("Thread b finished...");
    }
}
